package com.smasher.dialog.progress

import androidx.annotation.ColorRes
import androidx.annotation.DrawableRes
import com.smasher.dialog.R

class Builder {

    private var message: CharSequence = ""
    private var progressColor: Int = R.color.color_CBF3D4
    private var textColor: Int = R.color.color_CBF3D4
    private var backgroundRes: Int = R.drawable.dialog_background

    fun setMessage(message: CharSequence): Builder {
        this.message = message
        return this
    }

    fun setProgressColor(@ColorRes color: Int): Builder {
        this.progressColor = color
        return this
    }

    fun setTextColor(@ColorRes color: Int): Builder {
        this.textColor = color
        return this
    }

    fun setBackgroundResource(@DrawableRes resId: Int): Builder {
        this.backgroundRes = resId
        return this
    }

    fun build(): ProgressOption {
        return ProgressOption(
            message,
            progressColor,
            textColor,
            backgroundRes
        )
    }

}